package dao;

import java.sql.Timestamp;

public class blog {
//    create table dao.blog(blogId int primary key auto_increment,
//    -> title varchar(1024),
//    -> content mediumtext,
//    -> postTime datetime,
//    -> userId int);
    private int blogId;
    private String title;
    private String content;
    //Date类型表示日期，Timestamp可以表示到秒
    private Timestamp postTime;
    private int useId;

    public int getBlogId() {
        return blogId;
    }

    public void setBlogId(int blogId) {
        this.blogId = blogId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Timestamp getPostTime() {
        return postTime;
    }

    public void setPostTime(Timestamp postTime) {
        this.postTime = postTime;
    }

    public int getUseId() {
        return useId;
    }

    public void setUseId(int useId) {
        this.useId = useId;
    }

    @Override
    public String toString() {
        return "blog{" +
                "blogId=" + blogId +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", postTime=" + postTime +
                ", useId=" + useId +
                '}';
    }
}
